<!--{json width:"550",title:"精华分类"}-->
<style type="text/css">
#mod_digest_form dt {width: 20%;}
#mod_digest_form dd {width: 79%;}
</style>
<form action="?mod-digest-fid-$fid-fid_tids-$fid_tids-ajax-1.htm" method="post" id="mod_digest_form">
	<input type="hidden" name="FORM_HASH" value="{FORM_HASH}" />
	<input type="hidden" name="cateids" id="cateids" value="$cateids" />
	<dl>
		<dt><label>主题：</label></dt>
		<dd>$threads (篇)</dd>
		
		<dt><label for="digest">精华等级：</label></dt>
		<dd>
			<input type="radio" name="rank" id="digest_0" value="0" checked="checked" /><label for="digest_0">取消精华</label>
			<input type="radio" name="rank" id="digest_1" value="1" /><span class="icon icon-digest-1"></span><label for="digest_1">一级精华</label>
			<input type="radio" name="rank" id="digest_2" value="2" /><span class="icon icon-digest-2"></span><label for="digest_2">二级精华</label>
			<input type="radio" name="rank" id="digest_3" value="3" /><span class="icon icon-digest-3"></span><label for="digest_3">三级精华</label>
		</dd>
		
		<dt><label for="digest_comment">版主备注：</label></dt>
		<dd>
			<textarea name="comment" id="digest_comment" style="width: 400px; height: 40px;" onkeyup="if(this.value.length > 64) {alert('最多只能输入64个字符。'); return false;}">$modlog[comment]</textarea>
		</dd>
		
		<dt><label>通知作者：</label></dt>
		<dd><input type="checkbox" name="systempm" value="1" checked="checked" /></dd>
		
		<dt></dt>
		<dd>
			<input type="submit" class="button bigblue" id="mod_digest_submit" value="确定" />
			<input type="button" class="button biggrey" value="关闭" id="mod_digest_cancel"/>
		</dd>
	</dl>
</form>

<script type="text/javascript">
// 延迟执行的脚本，约定名字为：delay_execute()
function delay_execute(dialog, recall) {
	$('#mod_digest_submit').focus();
	$('#mod_digest_submit').click(function() {
		$('#mod_digest_submit').disable();
		var postdata = $("#mod_digest_form").serialize();
		$.post($('#mod_digest_form').attr('action'), postdata,  function(s){
			$('#mod_digest_submit').enable();
			var json = json_decode(s);
			if(error = json_error(json)) {alert(error); return false;}
			if(!json.status > 0) {
				dialog.set_body('<div class="error">'+json.message+'！</div>');
				return false;
			}
			dialog.set_body('<div class="ok">'+json.message+'！</div>');
			setTimeout(function(){
 				dialog.close(true);
	 			if(recall) recall();
	 		}, 1000);
		  });
		return false;
	});
	
	$('#mod_digest_cancel').click(function() {
		dialog.close(true);
	});
	
	$('#digest_$thread[digest]').attr('checked', 'checked');
}
</script>